The present disclosure relates to an image processing device, an image processing method, and a program. More particularly, the present disclosure relates to an image processing device, an image processing method, and a program, performing recording, outputting or displaying through switching between a three-dimensional image (3D image) and a two-dimensional image (2D image) based on an analysis result of an image.
In recent years, a display device such as a television or a PC capable of displaying a three-dimensional image (3D image), or a video camera, a still camera, and the like capable of recording a three-dimensional image (3D image), have been developed and used. The 3D image is displayed using captured images having different viewpoints, that is, a left eye image and a right eye image. Therefore, when the 3D image is recorded on a medium, it is necessary to record one set of the left eye image and the right eye image, and during a reproduction process, the reproduction is performed using the one set of the left eye image and the right eye image.
A camera, which can capture a 3D image, has lenses which are set at spaced-apart positions and capture a left eye image and a right eye image, and simultaneously captures images having two different viewpoints from the lenses spaced apart from each other. The image capturing is performed using a so-called twin-lens reflex camera. However, in the twin-lens reflex camera, there are several conditions for capturing a favorable 3D image. For example, there is a case where a favorable 3D image may not be captured depending on a position of a subject.
For example, Japanese Patent No. 3186448 and Japanese Unexamined Patent Application Publication No. 2010-161492 disclose as the related art a camera which does not record a 3D image but records a 2D image in a case where a favorable 3D image may not be captured.
Japanese Patent No. 3186448 and Japanese Unexamined Patent Application Publication No. 2010-161492 disclose a configuration in which a photographing mode is switched between a 2D mode for capturing a 2D image and a 3D mode for capturing a 3D image depending on a distance of the subject during the photographing using the twin-lens reflex camera.
A detailed example will be described with reference to FIGS. 1A and 1B. FIGS. 1A and 1B show a positional relationship between the subject and each lens (camera 1 and camera 2) of the twin-lens reflex camera in two cases, a case where the subject is distant from the camera (FIG. 1A) and a case where the subject is close to the camera (FIG. 1B).
As shown in FIG. 1A, when the subject is distant from the camera, both of the lenses (camera 1 and camera 2) can focus on the subject, and thus a 3D image is captured.
However, as shown in FIG. 1B, when the subject is close to the camera, no lenses (camera 1 and camera 2) can focus on the subject, and thus a 2D image is captured.
A conversion process thereof will be described more in detail with reference to FIGS. 2A to 2C.
As shown in FIG. 2A, in a normal case (the subject is spaced apart from the camera by a predetermined distance or more as shown in FIG. 1A), a focal point of the left eye image and a focal point of the right eye image are collected at the same position, and thus a 3D display is possible.
However, in a case where the subject is at a close distance as shown in FIG. 1B, even if the focal points of the images captured by the two imaging units are attempted to be collected as shown in FIG. 2B, the focal points may not be collected, and thus the 3D display is displayed such that two images appear shaky.
In addition, there has been proposed a configuration in which the images as shown in FIG. 2B undergo an image process shown in FIG. 2C and are generated as images which can be displayed in a 3D manner.
The process shown in FIG. 2C is an image process where focal points of the two images are misaligned so as to be collected, and regions in which the two images do not overlap each other do not have image data for the other eye and thus undergo a mask process, that is, are painted in black as regions incapable of performing 3D display.
Hereinbefore, some professionals used the 3D camera for capturing a 3D image in order to obtain particular images aiming at 3D effects due to high price or the size thereof, and thus even a distant subject can be considered only in a range having parallax.
However, presently, low-priced and small-sized 3D cameras are available and thus can be used by general users without burden. For example, there are many cases where a general user takes snapshots or the like as 3D images at travel destinations. However, for example, a landscape picture including only a subject such as a distant hill is an image where the overall subject has little parallax. Even if the subject is photographed and recorded as a 3D image and is displayed as a 3D image using a 3D display device, stereoscopic vision, that is, perspective is hardly recognized. In order to recognize stereoscopic vision by performing 3D display with a display device, it is necessary to include a subject giving sufficient parallax.
In consideration of this fact, the current camera (image capturing device) having a function of capturing a 3D image has the following problems.
PROBLEM 1
In the image capturing device having two imaging units photographing a left eye viewpoint and a right eye viewpoint, at the time of photographing, in a case where all subjects are positioned at a long distance such as a landscape picture, or, for example, if a planar subject such as a painting is photographed, parallax between an image in the left viewpoint and an image in the right viewpoint does not occur or occurs little. For this reason, even if displayed on a 3D display device, images which give little stereoscopic vision are displayed in a manner similar to a 2D image display. On the other hand, the file size of 3D image data is twice that of 2D image data, and thus a storage capacity necessary for a recording unit becomes excessive.
PROBLEM 2
In the image capturing device having two imaging units photographing a left eye viewpoint and a right eye viewpoint, at the time of photographing, in a case where all subjects are at a long distance such as a landscape picture, or, for example, if a planar subject such as a painting is photographed, parallax between an image in the left viewpoint and an image in the right viewpoint does not occur or occurs little. For this reason, even if displayed on a 3D display device, images which little give stereoscopic vision are displayed in a manner similar to a 2D image display. On the other hand, a 3D image is recorded in a recording unit as a 3D file format, and thus may not be displayed on a display device other than a 3D display device or a 3D display supporting output device.
PROBLEM 3
In the image capturing device having two imaging units photographing a left eye viewpoint and a right eye viewpoint, at the time of photographing, in a case where all subjects are at a long distance such as a landscape picture, or, for example, if a planar subject such as a painting is photographed, parallax between an image in the left viewpoint and an image in the right viewpoint does not occur or occurs little. For this reason, for example, in a case where photographing is set while viewing a 3D display device with the naked eye during photographing, there are cases where optimal settings may not be performed since differentiation with an influence of crosstalk on left and right eye images for 3D display is difficult, although differences in various kinds of settings such as exposure or white balance for each imaging unit occur in practice.